Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-service): auto insert feature does not abstract selection #156

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

johnsoncodehk
Copy link
Member

In the previous auto insertion implementation, @volar/vscode always issued requests with the end position of the changed range as a parameter. Based on whether the current selections include the end position of the changed range, it determines whether to insert the text into the selections or the end position of the changed range.

Now it is changed to always issue requests with the selection position and always insert the text into the selections. LanguageServicePlugin are responsible for determining whether the selection is at the end position of the changed range to determine whether to provide auto insert text.

This will resolve the limitation of not being able to achieve vuejs/language-tools#4140 downstream.

@johnsoncodehk johnsoncodehk merged commit 8afff8e into master Apr 2, 2024
6 checks passed
@johnsoncodehk johnsoncodehk deleted the auto-insert-improve branch April 2, 2024 09:32
johnsoncodehk added a commit to volarjs/services that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant